function st = makecall(args, origin, kwargs)
    % check if signed in and grab username, key, domain
    [un, key, domain] = signin;

    if isempty(un) || isempty(key)
        error('Plotly:CredentialsNotFound',...
             ['It looks like you haven''t set up your plotly '...
              'account credentials yet.\nTo get started, save your '...
              'plotly username and API key by calling:\n'...
              '>>> saveplotlycredentials(username, api_key)\n\n'...
              'For more help, see https://plot.ly/MATLAB or contact '...
              'chris@plot.ly.']);
    end

    platform = 'MATLAB';

    url = [domain '/clientresp/'];

    st = webwrite( ...
            url, ...
            'platform',platform, ...
            'version',plotly_version, ...
            'args',m2json(args), ...
            'un',un, ...
            'key',key, ...
            'origin',origin, ...
            'kwargs',m2json(kwargs) ...
    );
end
